﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.ComponentModel;

namespace Chinaer.WCF.Contracts
{
    public partial interface IChinaer
    {
        [OperationContract]
        [WebInvoke(Method = "GET",
            BodyStyle = WebMessageBodyStyle.Bare,
            RequestFormat = WebMessageFormat.Json,
            ResponseFormat = WebMessageFormat.Json,
            UriTemplate = "GetDingDanByTime/{beginTime}/{endTime}/{dianPuID}/{apiToken}")]
        [Description("通过时间范围获取订单")]
        List<DTO.DingDanDTO> GetDingDanByTime(string beginTime,string endTime,string dianPuID,string apiToken);

        [OperationContract]
        [WebInvoke(Method = "POST",
            BodyStyle = WebMessageBodyStyle.Bare,
            RequestFormat = WebMessageFormat.Json,
            ResponseFormat = WebMessageFormat.Json,
            UriTemplate = "AddDingDan")]
        [Description("添加订单")]
        Chinaer.Model.Common.JsonResult AddDingDan(DTO.DingDanDTO dingDanDTO);

        [OperationContract]
        [WebInvoke(Method = "GET",
            BodyStyle = WebMessageBodyStyle.Bare,
            RequestFormat = WebMessageFormat.Json,
            ResponseFormat = WebMessageFormat.Json,
            UriTemplate = "DeleteDingDanByID/{dingDanID}")]
        [Description("根据订单编号删除订单")]
        Chinaer.Model.Common.JsonResult DeleteDingDanByID(string dingDanID);

        [OperationContract]
        [WebInvoke(Method = "POST",
            BodyStyle = WebMessageBodyStyle.Bare,
            RequestFormat = WebMessageFormat.Json,
            ResponseFormat = WebMessageFormat.Json,
            UriTemplate = "DeleteDingDan")]
        [Description("删除订单")]
        Chinaer.Model.Common.JsonResult DeleteDingDan(DTO.DingDanDTO dingDanDTO);

        [OperationContract]
        [WebInvoke(Method = "POST",
            BodyStyle = WebMessageBodyStyle.Bare,
            RequestFormat = WebMessageFormat.Json,
            ResponseFormat = WebMessageFormat.Json,
            UriTemplate = "UpdateDingDan")]
        [Description("更新订单")]
        Chinaer.Model.Common.JsonResult UpdateDingDan(DTO.DingDanDTO dingDanDTO);

    }
}
